﻿using Dos.ORM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Finance.Poco
{
    /// <summary>
    /// 实体类ViewUser 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class ViewUser : Entity
    {
        public ViewUser() : base("v_user") { }

        #region Model
        private int _Id;
        private string _UserName;
        private string _Password;
        private DateTime? _LastLoginTime;
        private string _LastLoginIP;
        private DateTime? _CreateTime;
        private string _CreateUserName;
        private int? _OrgId;
        private int _IsEnable;
        private string _Post;
        private string _Email;
        private string _PasswordQuestion;
        private string _PasswordAnswer;
        private int _IsApproved;
        private string _ProviderUserKey;
        private string _OrgName;
        /// <summary>
        /// 
        /// </summary>
        public int Id
        {
            get { return _Id; }
            set
            {
                this.OnPropertyValueChange(_.Id, _Id, value);
                this._Id = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string UserName
        {
            get { return _UserName; }
            set
            {
                this.OnPropertyValueChange(_.UserName, _UserName, value);
                this._UserName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Password
        {
            get { return _Password; }
            set
            {
                this.OnPropertyValueChange(_.Password, _Password, value);
                this._Password = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? LastLoginTime
        {
            get { return _LastLoginTime; }
            set
            {
                this.OnPropertyValueChange(_.LastLoginTime, _LastLoginTime, value);
                this._LastLoginTime = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string LastLoginIP
        {
            get { return _LastLoginIP; }
            set
            {
                this.OnPropertyValueChange(_.LastLoginIP, _LastLoginIP, value);
                this._LastLoginIP = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? CreateTime
        {
            get { return _CreateTime; }
            set
            {
                this.OnPropertyValueChange(_.CreateTime, _CreateTime, value);
                this._CreateTime = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string CreateUserName
        {
            get { return _CreateUserName; }
            set
            {
                this.OnPropertyValueChange(_.CreateUserName, _CreateUserName, value);
                this._CreateUserName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? OrgId
        {
            get { return _OrgId; }
            set
            {
                this.OnPropertyValueChange(_.OrgId, _OrgId, value);
                this._OrgId = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int IsEnable
        {
            get { return _IsEnable; }
            set
            {
                this.OnPropertyValueChange(_.IsEnable, _IsEnable, value);
                this._IsEnable = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Post
        {
            get { return _Post; }
            set
            {
                this.OnPropertyValueChange(_.Post, _Post, value);
                this._Post = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Email
        {
            get { return _Email; }
            set
            {
                this.OnPropertyValueChange(_.Email, _Email, value);
                this._Email = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string PasswordQuestion
        {
            get { return _PasswordQuestion; }
            set
            {
                this.OnPropertyValueChange(_.PasswordQuestion, _PasswordQuestion, value);
                this._PasswordQuestion = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string PasswordAnswer
        {
            get { return _PasswordAnswer; }
            set
            {
                this.OnPropertyValueChange(_.PasswordAnswer, _PasswordAnswer, value);
                this._PasswordAnswer = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int IsApproved
        {
            get { return _IsApproved; }
            set
            {
                this.OnPropertyValueChange(_.IsApproved, _IsApproved, value);
                this._IsApproved = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ProviderUserKey
        {
            get { return _ProviderUserKey; }
            set
            {
                this.OnPropertyValueChange(_.ProviderUserKey, _ProviderUserKey, value);
                this._ProviderUserKey = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string OrgName
        {
            get { return _OrgName; }
            set
            {
                this.OnPropertyValueChange(_.OrgName, _OrgName, value);
                this._OrgName = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 是否只读
        /// </summary>
        public override bool IsReadOnly()
        {
            return true;
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.Id,
				_.UserName,
				_.Password,
				_.LastLoginTime,
				_.LastLoginIP,
				_.CreateTime,
				_.CreateUserName,
				_.OrgId,
				_.IsEnable,
				_.Post,
				_.Email,
				_.PasswordQuestion,
				_.PasswordAnswer,
				_.IsApproved,
				_.ProviderUserKey,
				_.OrgName};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._Id,
				this._UserName,
				this._Password,
				this._LastLoginTime,
				this._LastLoginIP,
				this._CreateTime,
				this._CreateUserName,
				this._OrgId,
				this._IsEnable,
				this._Post,
				this._Email,
				this._PasswordQuestion,
				this._PasswordAnswer,
				this._IsApproved,
				this._ProviderUserKey,
				this._OrgName};
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "v_user");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Id = new Field("Id", "v_user", "Id");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field UserName = new Field("userName", "v_user", "userName");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Password = new Field("password", "v_user", "password");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field LastLoginTime = new Field("lastLoginTime", "v_user", "lastLoginTime");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field LastLoginIP = new Field("lastLoginIP", "v_user", "lastLoginIP");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateTime = new Field("createTime", "v_user", "createTime");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateUserName = new Field("createUserName", "v_user", "createUserName");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field OrgId = new Field("orgId", "v_user", "orgId");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsEnable = new Field("isEnable", "v_user", "isEnable");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Post = new Field("post", "v_user", "post");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Email = new Field("email", "v_user", "email");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field PasswordQuestion = new Field("passwordQuestion", "v_user", "passwordQuestion");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field PasswordAnswer = new Field("passwordAnswer", "v_user", "passwordAnswer");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsApproved = new Field("isApproved", "v_user", "isApproved");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ProviderUserKey = new Field("providerUserKey", "v_user", "providerUserKey");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field OrgName = new Field("orgname", "v_user", "orgname");
        }
        #endregion


    }

}
